package com.sky.service.impl;

import com.sky.mapper.MeetingRoomStatusMapper;
import com.sky.mapper.RoomStatusChangeMapper;
import com.sky.service.RoomStatusChangeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable;

@Service
public class RoomStatusChangeServiceImpl implements RoomStatusChangeService {

    @Autowired
    private RoomStatusChangeMapper roomStatusChangeMapper;

    @Override
    // 会议室状态: 预定 -> 使用
    public boolean changeStatusBU(Long id) {
        roomStatusChangeMapper.changeStatusBU(id);
        return true;
    }

    @Override
    // 会议室状态: 使用 -> 空闲
    public boolean changeStatusUF(Long id) {
        roomStatusChangeMapper.changeStatusUF(id);
        return true;
    }

    @Override
    // 会议室状态: 使用 -> 维护
    public boolean changeStatusUS(Long id) {
        roomStatusChangeMapper.changeStatusUS(id);
        return true;
    }

    @Override
    // 会议室状态: 维护 -> 空闲
    public boolean changeStatusSF(Long id) {
        roomStatusChangeMapper.changeStatusSF(id);
        return true;
    }
}
